﻿
@inherits ServiceStack.Razor.ViewPage<ServiceStack.Razor.Tests.Person>
@using System
@using ServiceStack.Razor.Tests
@using ServiceStack.Common
@using ServiceStack.Common.Web
@using ServiceStack.Web
@using ServiceStack.WebHost.Endpoints


@{

    var myvariable = "";
    if ( this.Request.HttpMethod == HttpMethods.Post )
    {
        //there is a postback...
        myvariable = "FFFFFFFFFFFFFFF";
    }
 
}

<div>
    <h4>/default.cshtml</h4>
    The time is: @DateTime.Now
    
    @if ( this.Request.HttpMethod == HttpMethods.Post )
    {
        <p>Your name is @Model.Name</p>
        <h1>This IS A POST BACK</h1>
        <h1>@myvariable</h1>
    }
    else
    {
        <h1>This is a GET request</h1>
    }


    <form method="POST">
        What name do you want? @Html.TextBox( "Name" )
        <button name="cmdGo" value="123">submit</button>
    </form>

</div>
